/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package UserBeans;

import Action.EventSessionBeanLocal;
import Entity.Category;
import Entity.Event;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author Minh Duong
 */
@ManagedBean(name="UsereventBean")
@RequestScoped
public class UserEventBean implements Serializable{
    @EJB
    private EventSessionBeanLocal eventSessionBean;

    /** Creates a new instance of UserEventBean */
    public UserEventBean() {
    }
private int eventId;
private String eventTitle;
private String eventInfo;
private String eventImg;
private Date releaseDate;
private int duration;
private Date endDate;
private Category category;
private Event event;

    public UserEventBean(Event event) {
        this.event = event;
    }


    public Category getCategory() {
        return category;
    }

    public void setCategory(Category category) {
        this.category = category;
    }

    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public int getEventId() {
        return eventId;
    }

    public void setEventId(int eventId) {
        this.eventId = eventId;
    }

    public String getEventImg() {
        return eventImg;
    }

    public void setEventImg(String eventImg) {
        this.eventImg = eventImg;
    }

    public String getEventInfo() {
        return eventInfo;
    }

    public void setEventInfo(String eventInfo) {
        this.eventInfo = eventInfo;
    }

    public String getEventTitle() {
        return eventTitle;
    }

    public void setEventTitle(String eventTitle) {
        this.eventTitle = eventTitle;
    }

    public Date getReleaseDate() {
        return releaseDate;
    }

    public void setReleaseDate(Date releaseDate) {
        this.releaseDate = releaseDate;
    }

    public List<Event> listByCat(String catName){
        return eventSessionBean.listbyCat(catName);
    }

    public List<Event> listAvailableEvent(){
        return eventSessionBean.listAvailableEvent();
    }

    public List<Event> listNextEvent(){
        return eventSessionBean.listNextEvent();
    }
}
